/**
 * 节点相关类型定义
 */

/**
 * 节点状态
 */
export interface NodeStatus {
  nodeId: string
  nodeName: string
  ipAddress: string
  port: number
  status: 'online' | 'offline' | 'busy'
  cpuUsage: number
  memoryUsage: number
  diskUsage?: number
  runningTasks: number
  capabilities: string[]
  lastHeartbeat: string
  version?: string
  startTime?: string
}

/**
 * 节点统计
 */
export interface NodeStatistics {
  totalNodes: number
  onlineNodes: number
  offlineNodes: number
  busyNodes: number
  totalCapacity: number
  usedCapacity: number
  availableCapacity: number
}

/**
 * 节点注册令牌
 */
export interface NodeRegistrationToken {
  token: string
  name: string
  description?: string
  expiresAt: string
  maxUsageCount: number
  usedCount: number
  isActive: boolean
  createdAt: string
  registrationCommand?: string
}

/**
 * 创建节点注册令牌请求
 */
export interface CreateNodeRegistrationTokenRequest {
  name: string
  description?: string
  expiresInHours: number
  maxUsageCount: number
}

/**
 * 节点任务信息
 */
export interface NodeTaskInfo {
  taskId: number
  stepName: string
  status: number
  startTime: string
  progress?: number
}
